package com.yvon.maple.cloud.api.msg.feign;

import com.yvon.boot.common.result.ResponseData;
import com.yvon.maple.cloud.api.msg.feign.factory.RemoteMsgFallbackFactory;

import com.yvon.maple.cloud.api.msg.vo.SendMsgVo;
import com.yvon.maple.constants.ServiceNameConstant;
import com.yvon.maple.constants.SystemConstant;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author : Yvon
 * @since : 2021-09-15
 */
@FeignClient(value = ServiceNameConstant.MSG_SERVICE, fallbackFactory = RemoteMsgFallbackFactory.class)
public interface RemoteMsgClient {

	String PATH = SystemConstant.Common.FEIGN_INSIDE_URL_PREFIX + "/msg";

    /**
     * 发送
     *
     * @param msg msg
     * @return ResponseData
     * @author : Yvon / 2021-09-15
     */
    @PostMapping(value = "/sends/sendMsg")
    ResponseData<Boolean> send(@Validated @RequestBody SendMsgVo msgVo);
}
